<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/template/layout.xhtml">

<ui:define name="body">

	<h:form prependId="false">
	
		<h:panelGroup layout="block" id="pnlHomeSuperior">
			<h:panelGroup layout="block" styleClass="ladoE">
				<p:spacer width="5" />
			</h:panelGroup>
			<h:panelGroup layout="block" styleClass="ladoD">
				<p:commandLink ajax="true" actionListener="#{anuncioAction.pesquisar}">
					<h:graphicImage value="/img/btn_guiamap.png" />
				</p:commandLink>
			</h:panelGroup>
		</h:panelGroup>
		
		<h:panelGroup layout="block" styleClass="clearAll" style="height: 50px;"></h:panelGroup>
		
		<h:panelGroup layout="block" style="width: 100%; height: 115px; text-align: center;">
			<h:graphicImage value="/img/logo.png" />
		</h:panelGroup>
	
		<h:panelGroup layout="block" style="width: 100%; text-align: center;" styleClass="fontHelveticaBold12">
			<h:outputText value="#{msg['label.o.que.procura']}" />
		</h:panelGroup>
		
		<p:spacer height="5" />
		
		<h:panelGroup layout="block" style="width: 100%; text-align: center;">
			<p:autoComplete value="#{anuncioAction.anuncioPesquisaBean}" completeMethod="#{anuncioAction.completeServicoEspecialidade}" var="bean"
				itemLabel="#{bean.termoCombinado}" itemValue="#{bean}" multiple="false" converter="#{servicoEspecialidadeConverter}" size="40">
					<p:column>								
						<h:outputText value="#{bean.servico} " /> <h:outputText value="#{msg['label.hifen']}" rendered="#{bean.especialidade != null}"/> <h:outputText value="#{bean.especialidade}" />
					</p:column>
			</p:autoComplete>
		</h:panelGroup>
		
		<p:spacer height="10" />
			
		<h:panelGroup layout="block" style="width: 100%; text-align: center;">
			<p:commandLink ajax="false" action="#{anuncioAction.pesquisar}" update=":msgSistemaGeral">
				<f:param name="idBairro" value="1" />
				<h:graphicImage value="/img/btn_asa_sul.png" />
			</p:commandLink>
			
			<p:spacer width="10" />
			
			<p:commandLink ajax="false" action="#{anuncioAction.pesquisar}" update=":msgSistemaGeral">
				<f:param name="idBairro" value="2" />
				<h:graphicImage value="/img/btn_asa_norte.png" />
			</p:commandLink>			
		</h:panelGroup>
		
		<p:spacer height="200" />
		
	</h:form>

</ui:define>

</ui:composition>